@use "../variables" as *;
@use "sass:color";

.help-icon {
  font-size: 1.3rem;
}

.help {
  display: inline;
  margin-left: 2rem;
  .help-text {
    display: none;
  }
  &:hover,
  &:active {
    .help-text {
      display: block;
      position: absolute;
      left: 17rem;
      bottom: -0.8rem;
      z-index: 999;
      padding: 2px;
      font-style: normal;
      background-color: $dark_gray;
      color: $off_white;
      border-radius: 3px;
      padding: .5rem .8rem;
      width: 250px;
    }
  }
  .bp6-popover-content {
    max-height: 20rem;
    overflow-y: auto;
  }
}

.help-text-content {
  font-size: 1.4rem;
  a {
    &:hover {
      text-decoration: underline !important;
      font-weight: normal !important;
    }
    .fa-external-link {
      margin: 0 0.5rem;
    }
  }
  .markdown {
    a {
      text-decoration: underline !important;
    }
    p {
      width: unset;
      text-overflow: unset;
      overflow: unset;
      white-space: unset;
      font-size: 1.4rem;
      line-height: 1.3;
      margin-top: 0;
    }
  }
}

.title-help {
  display: inline;
  .title-help-icon {
    margin-left: 1rem;
  }
  .title-help-text {
    overflow: hidden;
    max-height: 0;
    color: transparent;
    transition: all 0.5s ease;
    transition-delay: 0.2s;
    line-height: 2rem;
    font-family: sans-serif;
    .fa-external-link {
      margin: 0 0.5rem;
    }
    a {
      pointer-events: all;
    }
    a:link {
      color: $black;
    }
    a:hover {
      text-decoration: underline;
      color: unset; // sass-lint:disable-line variable-for-property
    }
    a:active {
      color: $black;
    }
    &.open{
      max-height: 16rem;
      color: unset; // sass-lint:disable-line variable-for-property
      transition: all 0.5s ease;
      margin-bottom: 4rem;
    }
  }
}
.title-help-icon {
  display: inline;
  margin: 0 1rem;
}
